IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'SagasGetByCreatorRole')
	BEGIN
		DROP  Procedure  SagasGetByCreatorRole
	END

GO

CREATE Procedure SagasGetByCreatorRole
@CreatorID INT,
@SagaRoleID INT
AS
Select 
s.SagaID,
s.Name
From Saga s
Join  SagaCreators sc ON sc.SagaID = s.SagaID
Where sc.CreatorID =  @CreatorID
And sc.SagaRoleID = @SagaRoleID
GO



